<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            border: 1px solid red;
        }
        .d1{
           position: fixed;
            left: 200px;
            top: 200px;
        }
        .d2{
            color: white;
            border: none;
            width: 40px;
            height: 1000px;
            background: rgba(0,0,0,0.3);
            position: fixed;
            right: 0px;
            top: 0px;
        ;

        }


    </style>
</head>
<body>
    <div>div1</div>
    <div class="d1">div2</div>
    <div>div3</div>
    <div class="d2">
        右侧导航栏
    </div>

    <br><br><br><br><br><br><br><br><br><br><br><br>
    <br><br><br><br><br><br><br><br><br><br><br><br>
    <br><br><br><br><br><br><br><br><br><br><br><br>
    <br><br><br><br><br><br><br><br><br><br><br><br>
    <br><br><br><br><br><br><br><br><br><br><br><br>
</body>
</html>